﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using TowerDef_s_enseLibrary.player;

namespace TowerDef_s_enseLibrary.game
{
    public class TowerMenu
    {
        #region variables

        private Texture2D _texture;
        // A class to access the _font we created
        private SpriteFont _font;
        // The _position of the toolbar
        private Vector2 _position;
        // The _position of the _text
        private Vector2 _textPosition;

        string _text;

        #endregion variables

        #region functions

        /// <summary>
        /// Creates a new tower menu
        /// </summary>
        /// <param name="texture">The tower menu Texture</param>
        /// <param name="font">The sprite _font </param>
        /// <param name="position">The _position of the sprites</param>
        public TowerMenu(Texture2D texture, SpriteFont font, Vector2 position)
        {
            this._texture = texture;
            this._font = font;
            this._position = position;

            // Offset the _text to the bottom right corner
            _textPosition = new Vector2(430, position.Y + 10);
        }

        /// <summary>
        /// Draws the current tower menu
        /// </summary>
        /// <param name="spriteBatch">A group of sprite settings</param>
        /// <param name="player">The current player</param>
        public void Draw(SpriteBatch spriteBatch, Player player)
        {
            //spriteBatch.Draw(Texture, _position, Color.White);
            _text = string.Format("Gold : {0} Lives : {1}", player.Money, player.Lives);
            spriteBatch.DrawString(_font, _text, _textPosition, Color.White);
        }

        #endregion functions

        #region events



        #endregion events
    }
}
